var res = [
	"R/background.png",
	"R/hero1.png",
	"R/bullet2.png", 
	
	"R/enemy0.png", //小飞机
	"R/enemy1.png", //中飞机
	"R/enemy2.png", //大飞机
	
	"R/prop_type_0.png", //双排子弹
	"R/prop_type_1.png", //原子弹
	
	"R/enemy1_hit.png", //中飞机
	"R/enemy2_hit.png", //大飞机
	"R/enemy0_down1.png", //小飞机
	"R/enemy0_down2.png",
	"R/enemy0_down3.png",
	"R/enemy0_down4.png",
	
	"R/enemy1_down1.png", //中飞机爆炸图片
	"R/enemy1_down2.png",
	"R/enemy1_down3.png",
	"R/enemy1_down4.png",
	
	"R/enemy2_down1.png", //大飞机的爆炸图片
	"R/enemy2_down2.png",
	"R/enemy2_down3.png",
	"R/enemy2_down4.png",
	"R/enemy2_down5.png",
	"R/enemy2_down6.png"
];
	var resObj = []; 
	var bulletList = []; 
	var enemyList = []; 
	var toolList = []; 
	var boomList = []; 
	var score = 0;
	
function loading(startGame) {
	var count = 0; 
	for (var i = 0; i < res.length; i++) {
		var img = new Image();
		img.src = res[i];
		resObj.push(img);
		img.onload = function() {
			count++;
			if (count == res.length) {
				startGame();
			}
		}
	}
}
export default {
	resObj: resObj,
	loading: loading,
	bulletList: bulletList,
	enemyList: enemyList,
	toolList: toolList,
	boomList: boomList,
	score:score
}
